Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

207
Views
The frame attempting navigation of the top-level window is sandboxed with the 'allow-top-navigation-by-user-activation'

I am trying to reload the page by hitting the same URL of the app but getting this error in googleappscript, previously it was working fine but not it has stopped working

function reLoad() {
       google.script.run
       .withSuccessHandler(function(){
        window.open("https://script.google.com/a/google.com/macros/s/AKfycbxqBb8dv488gLQjYCmJDGJ98EiX3Ipo5pUHmAHoRmY/dev","_top");
      })
}
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Google recently updated their iframe restrictions:

In the HTML Service iframe sandbox, allow-top-navigation, which allows the content to navigate its top-level browsing context, is restricted and not set as an attribute in the sandbox. Instead, the allow-top-navigation-by-user-activation attribute has been added to the sandbox.

If you need to redirect your script, add a link or a button for the user to take action on.

The function should work, if the function is called from the onclick handler of a button. The function should be directly associated with a click by the end user.

References:

  • Html Spec: allow-top-navigation-by-user-activation (See transient activation)
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!